feat(terminal): tmux navigator, presets, and custom preset files#7
Open
dguerizec wants to merge 9 commits intotwidi:mainfrom
Open
feat(terminal): tmux navigator, presets, and custom preset files#7dguerizec wants to merge 9 commits intotwidi:mainfrom
dguerizec wants to merge 9 commits intotwidi:mainfrom
Conversation
Add a configurable toolbar of shortcut buttons for the terminal: - 3 slots stored in localStorage (per-device, not synced) - Default: Ctrl+C, Ctrl+Z, one empty slot - Config panel toggled by re-clicking the Terminal tab - Each slot opens a dialog with live key capture (press any combo) - Supports Ctrl+A-Z, Alt+key, arrows, Esc, Tab, Enter, etc. - Per-button "Show on desktop" toggle - Buttons appear in the terminal toolbar alongside Copy mode toggle - On mobile: all non-empty buttons visible - On desktop: only buttons with showOnDesktop enabled
…s globally - Fix compact header not collapsing when re-clicking Terminal tab on mobile - Move terminalShortcuts to SYNCED_SETTINGS_KEYS so shortcuts configured on desktop are available on mobile (and vice versa)
…slot mismatch - Use hidden <input> instead of div[tabindex=0] for key capture so mobile browsers show the virtual keyboard - Reset _isApplyingRemoteSettings guard on nextTick to prevent ping-pong loop when backend broadcasts array/object synced settings back to sender - Pass shortcut data directly to dialog open() to avoid stale prop from same-tick reactivity delay - Dialog now closes itself after save/clear instead of relying on parent accessing unexposed template ref
…ab bar - Backend: SessionContext, tmux window CRUD (create/select/rename/send-keys), preset resolution from .twicc-tmux.json, window monitor task, scroll bindings - Frontend: TmuxNavigator component (shell picker with ad-hoc + preset sections), window tab bar (desktop), mobile dropdown, window state management in useTerminal - Tab re-click cycles: navigator → config (shortcuts) → terminal - Presets loaded from .twicc-tmux.json with multi-source resolution (project dir, git root, session cwd walk)
Move shortcut button slots from separate config panel into the TmuxNavigator, unifying terminal settings in one place. Unify shell rendering: all shells use play icon (green when running, grey when not), presets stay in their source sections in original order.
Allow users to add arbitrary JSON preset files to any project via a file browser dialog. Preset references are stored in ~/.twicc/presets/<project_id>.json and loaded as additional sources in the navigator. - Backend: preset file CRUD (paths.py, terminal.py, views.py), REST API endpoint, deduplication against built-in sources, content validation - Frontend: AddPresetDialog with file tree browser and show-hidden toggle, JSON-only file filter, remove button on custom preset sections
Presets can now specify relative_to (preset_dir|project_dir|git_dir| session_cwd) to control how their cwd is resolved. This enables library preset files loaded from another directory to run commands relative to the project root instead of the preset file location. Presets whose base directory is unavailable are greyed out in the navigator with a disabled state and explanatory message.
Replace misleading "at the root of your project directory" with the actual multi-source discovery chain: project dir, git root, then session cwd walk. Addresses PR review comment about documentation not reflecting the real lookup behavior.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
relative_tofield for cwd resolution (preset_dir,project_dir,git_dir,session_cwd), unavailable presets greyed out~/.twicc/presets/<project_id>.json, with deduplication against built-in sourcesDepends on #6 (terminal shortcuts).
Test plan
"relative_to": "project_dir"→ cwd resolves to project root"relative_to": "git_dir"when no git → preset greyed out🤖 Generated with Claude Code